package com.example.demo.Mappers;

import com.example.demo.beans.GetOrderListResponseitem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Administrator on 2018-04-24.
 */
@Mapper
public interface GetOrderListControllerMapper {
@Select("select  (Select CONVERT(varchar(100), OrderDate, 23))OrderDate ,TypeID,TypeName, DeptName, DoctID,DoctName, RankName, RegID,AppFee,RegFee,TreatFee,OtherFee,TimeRegion,Specialty,(case IsAvailable when '0' then '未取号' else'已取号'end)IsAvailable,RegWay,(case IsPay when '1' then'已付费'else '未付费' end)IsPay from AutoOrderList  where OrderDate>=(Select CONVERT(varchar(100), GETDATE(), 23)) and IsAvailable ='0' and (PatientID=#{PatientID} or CardNo=#{CardNo})")
    List<GetOrderListResponseitem>selectOrderList(@Param("PatientID")String PatientID,@Param("CardNo")String CardNo);
}
